When we send an anchor rectangle with a width or
height of 0, mutter reponds with "Invalid anchor
rectangle size". So, don't do that.
This was seen as sudden disappearance of gtk4-demo
when you click the fishbowl benchmark all the way
through to the menubuttons.
Fixes: #3027
real_anchor_rect_x = anchor_rect->x - parent->shadow_left;
real_anchor_rect_y = anchor_rect->y - parent->shadow_top;
- anchor_rect_width = anchor_rect->width;
- anchor_rect_height = anchor_rect->height;
+ anchor_rect_width = MAX (anchor_rect->width, 1);
+ anchor_rect_height = MAX (anchor_rect->height, 1);
gdk_popup_layout_get_offset (layout, &rect_anchor_dx, &rect_anchor_dy);